package poketrade;

import java.io.IOException;
import java.util.List;

import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import poketrade.managers.UserManager;

/**
 * Servlet implementation class CommunityServlet
 */
public class CommunityServlet extends BaseHttpServlet {
	private static final long serialVersionUID = 1L;
       
	@EJB 
	private UserManager mgr;
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		List<String> adresses = mgr.getAddressList();
		
		request.setAttribute("adresses", adresses);
		forward(request,response,"communaute.jsp");
		
	}



}
